﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;
using NLog;

namespace ResourceTypeConfigurationApp
{
    internal static class Program
    {
        private static readonly Logger Logger = LogManager.GetCurrentClassLogger();
        /// <summary>
        /// 应用程序的主入口点。
        /// </summary>
        [STAThread]
        static void Main()
        {
            try
            {
                // 加载NLog配置
                //LogManager.LoadConfiguration("nlog.config");
                // 推荐的新方式加载 NLog 配置
                LogManager.Setup().LoadConfigurationFromFile("nlog.config");


                Application.EnableVisualStyles();
                Application.SetCompatibleTextRenderingDefault(false);
                Application.Run(new fmMain());
            }
            catch (Exception ex)
            {
                Logger.Error(ex, ex.ToString());
                MessageBox.Show(ex.ToString());
            }
            
        }
    }
}
